#!/bin/sh
os=`uname -s`        # HP-UX,Linux,sunOS,FreeBSD,etc
rev=`uname -r`       # 7.x,B.08.00,A.09.01,4.1.2,1.1.0,etc

case $os in
FreeBSD)
  # Use following line for FreeBSD
  makecint -mk Makefile -dl pthread.dll -H pthd.h -D_THREAD_SAFE -D_POSIX_C_SOURCE=199506L -l -pthread  -cint -Z0
  ;;
OpenBSD)
  # Use following line for OpenBSD
  makecint -mk Makefile -dl pthread.dll -H pthd.h -D_THREAD_SAFE -D_POSIX_C_SOURCE=199506L -l -pthread  -cint -Z0
  ;;
QNX)
  # Use following line for QNX
  makecint -mk Makefile -dl pthread.dll -H pthd.h -D_POSIX_C_SOURCE=199506L -l -cint -Z0
  ;;
*)
  # Use this line for Linux, HP-UX, etc...
  makecint -mk Makefile -dl pthread.dll -H pthd.h -D_POSIX_C_SOURCE=199506L -l -lpthread  -cint -Z0
  ;;
esac

make
mv pthread.dll ../../include/pthread.dll
make clean
